/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package EnigmaUtils;

import Stones.BreakableStone;
import Stones.CrateDispenser;
import Stones.DeadlyStone;
import Stones.LockedStone;
import Stones.Oxyde;
import Stones.SimpleCrate;
import Stones.Stone;
import Stones.WallStone;

/**
 *
 * @author Snowangelic
 */
public class StoneFactory {
    public StoneFactory(){
    }

    public Stone generateStone(String type){
        if(type==null) return null;
        else if(type.equals("")) return null;
        else if(type.equals("WallStone")) return new WallStone();
        else if(type.equals("BreakableStone")) return new BreakableStone();
        else if(type.equals("RedOxyde")) return new Oxyde(1);
        else if(type.equals("BlueOxyde")) return new Oxyde(2);
        else if(type.equals("YellowOxyde")) return new Oxyde(3);
        else if(type.equals("GreenOxyde")) return new Oxyde(4);
        else if(type.equals("SimpleCrate")) return new SimpleCrate();
        else if(type.equals("CrateDispenser")) return new CrateDispenser();
        else if(type.equals("LockedStone")) return new LockedStone();
        else if(type.equals("DeadlyStone")) return new DeadlyStone();
        else return null;
    }
}
